home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / overview / dave falkenburg's sprocket / experimental stuff / mailablewindow.h < prev   
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.0 KB  |  72 lines

  1. /*
  2.     File:        MailableWindow.h
  3.  
  4.     Contains:    An abstract class for AOCE-mailable windows
  5.  
  6.     Written by: Dave Falkenburg    
  7.  
  8.     Copyright:    Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/19/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 8/26/94        DRF                Added AdjustPerfectWindowSizeForMailer.
  21.  
  22. */
  23. #ifndef    _MAILABLEWINDOW_
  24. #define    _MAILABLEWINDOW_
  25.  
  26. #include "Window.h"
  27.  
  28.  
  29. #define    kCanContract            true
  30. #define    kInitiallyExpanded        true
  31. #define    kDefaultAuthIdentity    ((AuthIdentity) 0)
  32.  
  33.  
  34. class    TMailableWindow : public TWindow
  35.     {
  36. public:
  37.                         TMailableWindow();
  38.     virtual                ~TMailableWindow();
  39.  
  40.     //    Overriden methods of TWindow
  41.     
  42.     virtual    Boolean        EventFilter(EventRecord * theEvent);
  43.     virtual void        CreateWindow(WindowType typeOfWindowToCreate = kNormalWindow);
  44.     virtual    void        Draw(void);
  45.     virtual void        AdjustForNewWindowSize(Rect * oldRect,Rect * newRect);
  46.     virtual    Boolean        Close(void);
  47.  
  48.     //    AOCE-specific methods
  49.     
  50.     virtual OSErr        AttachMailerToWindow(Boolean createExpanded);
  51.     virtual OSErr        RemoveMailerFromWindow(void);
  52.  
  53.     virtual void        ExpandOrContractMailer(Boolean doExpand);
  54.     
  55.     virtual void        AdjustPerfectWindowSizeForMailer(Rect * perfectSize);
  56.  
  57.     virtual void        AdjustForNewContentRect(Rect * prevContentRect,Rect * newContentRect);
  58.     virtual void        DrawContents(void);
  59.     
  60. protected:
  61.     Boolean                fMailerIsAttached;
  62.     Boolean                fMailerIsExpanded;
  63.  
  64.     Rect                fContentRect;
  65.  
  66.     //    AOCE-related data structures in here
  67.     };
  68.  
  69. pascal    WindowPtr    FrontWindowProcForAOCE(long /* unusedParam */);
  70.  
  71.  
  72. #endif